<template>
  <el-dialog
    v-if="open"
    class="dia-style"
    title="提示"
    :visible.sync="open"
    width="30%"
    :close-on-click-modal="false"
    @close="cancel"
  >
    <div class="content">
      <i class="el-icon-success" />
      手动触发任务成功,5-10分钟后刷新页面查询最新数据。
    </div>
    <div class="btn">
      <el-button type="primary" @click="submit">确定</el-button>
    </div>
  </el-dialog>
</template>
<script>
import { executeTask } from '@/api/assets/assetsComparison.js'
export default {
  data() {
    return {
      open: false
    }
  },
  methods: {
    submit() {
      executeTask().then((res) => {
        this.$modal.msgSuccess('同步成功')
        this.$emit('handleCancel')
        this.cancel()
      })
    },
    cancel() {
      this.open = false
    }
  }
}
</script>

<style lang="scss" scoped>
.content {
  padding: 20px 20px;
  font-weight: bold;
  i {
    font-size: 18px;
    color: #3abf81;
  }
}
.btn {
  text-align: right;
  padding-top: 20px;
}
</style>
